#include "StdAfx.h"
#include "Work.h"
#include "Worker.h"
#include <iostream>
#include <conio.h>
#include <list>

using namespace std;
	list <Worker> workers;
Work::Work(void)
{
}


Work::~Work(void)
{
}


void Work::addWorker (Worker  worker)
{
	workers.push_back(worker);
}
void Work::showWorkers()
{
	for(list<Worker>::iterator i = workers.begin(); i!= workers.end();i++)
	{
		if(Work::exp <= i->getExp())
		cout<<i->getName()<<endl;
	}
}
void Work::removeWorker(Worker worker)
{
	for(list<Worker>::iterator i = workers.begin();i != workers.end();i++)
	{
		if((i->getName()) == worker.getName())
			workers.erase(i);
	}
}
void Work::setExp(int exp)
{
	this->exp = exp;
}